package sk.tuke.lara.masplc.utils;

import jade.core.AID;
import jade.lang.acl.MessageTemplate;

public final class MsgTemplateFactory {
    private MsgTemplateFactory() {
        // factory pattern
    }

    /**
     * Vraci template na shodu s ConversationId a receivers
     * @param conversationId
     * @param aids
     * @return
     */
    public static MessageTemplate matchConversiation(String conversationId, AID... aids) {
        return MessageTemplate.and(MessageTemplate.MatchConversationId(conversationId),
                MessageTemplate.MatchReceiver(aids));
    }
}
